Skip to content

Conversation

@kishen-v
Copy link
Contributor

This PR introduces an ansible role to set SMT while setting up the build cluster.

The relevant documentation surrounding this topic will be submitted to k8s.io/infra, along the steps involved while setting up the build cluster as a follow-up task.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 11, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kishen-v
Once this PR has been reviewed and has the lgtm label, please assign rajalakshmi-girish for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 11, 2025

- name: Restart kubelet to update the node's capacity at the cluster level
shell: systemctl restart kubelet
when: node_type == "worker"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may be we can remove node_type once we set the hosts properly in the calling yaml file with hosts type set!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @mkumatag, I've made the changes generic to allow an option to set the SMT for a node regardless of its kind.

@kishen-v kishen-v changed the title Add playbook to set SMT on worker nodes [WIP]Add playbook to set SMT on worker nodes Oct 12, 2025
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 12, 2025
@kishen-v kishen-v changed the title [WIP]Add playbook to set SMT on worker nodes Add playbook to set SMT on worker nodes Oct 12, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 12, 2025

- name: Restart kubelet to update the node's capacity at the cluster level
shell: systemctl restart kubelet
when: inventory_hostname in groups[item.key]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

item usually will be applicable when loop in place, not sure what is behaviour here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @mkumatag, the when: inventory_hostname in groups[item.key] condition was added to prevent the command from running against all hosts, as the playbook has it defined..

Without this check, the last SMT value to be applied across was being set across all nodes, regardless of the previously set configuration..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update: Removed the looping as there are related files for masters/workers under group_vars.. The individual SMT levels are set in the respective files.

- role: reboot-sequentially
- reboot-sequentially

- name: Set desired SMT levels on nodes
Copy link
Contributor Author

@kishen-v kishen-v Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Necessary to set the SMT levels while patching, as the previous SMT configurations do not persist on a node restart.

@kishen-v kishen-v requested a review from mkumatag October 22, 2025 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants